﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/index.Master" CodeBehind="ListSkupin.aspx.cs" Inherits="Fotobanka.ListSkupin" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="Obsah" runat="server">
    <asp:HyperLink ID="AddLink" runat="server" NavigateUrl="PridatSkupinu.aspx">Přidat skupinu</asp:HyperLink><br />
    <br />
    <asp:Label ID="Label1" runat="server" Text="Moje skupiny:"></asp:Label><br />
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" 
        CellPadding="4" ForeColor="#333333" GridLines="None" DataKeyNames="Id" 
        onrowdatabound="GridView1_RowDataBound">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:BoundField DataField="GroupAdmin" HeaderText="Vlastník" 
                SortExpression="GroupAdmin" />
            <asp:BoundField DataField="Name" HeaderText="Jméno" SortExpression="Name" />
            <asp:BoundField DataField="Description" HeaderText="Popis" 
                SortExpression="Description" />
            <asp:CheckBoxField DataField="Deleteable" HeaderText="Smazatelná" 
                ReadOnly="True" SortExpression="Deleteable" />
            <asp:HyperLinkField DataNavigateUrlFields="Id" 
                DataNavigateUrlFormatString="SpravaUzivatelu.aspx?id={0}" HeaderText="U" 
                NavigateUrl="SpravaUzivatelu.aspx" Text="U" >
            <ItemStyle BorderColor="Black" BorderWidth="1px" />
            </asp:HyperLinkField>
            <asp:HyperLinkField DataNavigateUrlFields="Id" 
                DataNavigateUrlFormatString="EditovatSkupinu.aspx?id={0}" HeaderText="E" 
                NavigateUrl="EditovatSkupinu.aspx" Text="E" >
            <ItemStyle BorderColor="Black" BorderWidth="1px" />
            </asp:HyperLinkField>
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
    <br />
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        TypeName="Fotobanka.GroupManager" DeleteMethod="DeleteFromDb">
        <DeleteParameters>
            <asp:ControlParameter ControlID="GridView1" Name="id" 
                PropertyName="SelectedValue" />
        </DeleteParameters>
    </asp:ObjectDataSource>
    
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Ovladaci_panel" runat="server">
</asp:Content>